package com.wcgksoft.entity.goods;

import com.fasterxml.jackson.annotation.JsonBackReference;
import com.wcgksoft.entity.order.Order;
import com.wcgksoft.entity.system.SysUser;

import javax.persistence.*;
import java.math.BigDecimal;

/**
 * @author 阿良
 * @version 1.0.0
 * @ClassName AddServiceDetails.java
 * @Description TODO
 * @createTime 2020年05月22日 21:19:00
 */

@Entity
@Table(name="Shop_addservice_details")
public class AddServiceDetails {


  /**
   * id
   */
  @Id
  @Basic(optional = false)
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  @Column(name = "id", nullable = false)
  private Integer id;


  /**
   * 双向关联订单
   */
  @JsonBackReference
  @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.REFRESH)
  @JoinColumn(name = "sysuser_id")
  private SysUser sysUser;

  /**
   * 增值服务
   */
  @OneToOne
  @JoinColumn(name="addservice_id" )
  private AddService addService;

  public Integer getId() {
    return id;
  }

  public void setId(Integer id) {
    this.id = id;
  }

  public SysUser getSysUser() {
    return sysUser;
  }

  public void setSysUser(SysUser sysUser) {
    this.sysUser = sysUser;
  }

  public AddService getAddService() {
    return addService;
  }

  public void setAddService(AddService addService) {
    this.addService = addService;
  }
}
